import numpy as np
import ldtw

s1 = np.array([1, 2.1, 2.1,2.2,2.3,2.4,2.3,2.2, 2.5, 2.6, 4, 5], dtype=float)
gap_max_vec = np.array([0.0, 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0, 0.0, 0.0])   # 与 s1 等长
s2 = np.array([1, 2, 4, 5], dtype=float)
path, dist = ldtw.ldtw_path_c(s1, s2)
path_tw, dist_tw = ldtw.ldtw_path_tw_c(s1, s2)
path_tw2, dist_tw2 = ldtw.ldtw_path_tw_c(s1, s2, gap_max=gap_max_vec)
print("ldtw path:",path,"\n ldtw dist:",dist)
print("tldtw path:",path_tw,"\n tldtw dist:",dist_tw)
print("tldtw path2:",path_tw2,"\n tldtw dist2:",dist_tw2)
